﻿@model IEnumerable<shop.DanhMuc>
@{
    Layout = null;
}
@if (ViewBag.type=="1")
{
   <select name="IDCon">
     <option value="">Không chọn</option>
     @foreach(var item in Model )
     {
         <option value="@item.IDCha">@item.DanhMuc1</option>
     }
</select>
}
else
{


    <select name="IDCon">
        <option value="">Không chọn</option>
        @foreach (var item in Model)
        {
            if (ViewBag.IDCon==item.IDCha)
            {
              <option selected="selected" value="@item.IDCha">@item.DanhMuc1</option>  
            }
            else
            {
                <option value="@item.IDCha">@item.DanhMuc1</option>
            }
            
        }
    </select>
}